package com.mgg.common.client.user;

import com.mgg.common.entity.UserDO;
import com.mgg.common.vo.ResultVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: lijun
 * @Date: 2018/9/17 20:43
 */
@FeignClient(value = "user-api", fallback = UserClientFallback.class)
public interface UserClient {

    @RequestMapping(value="/user/query/byid/{userId}", method = RequestMethod.GET)
    ResultVO getUserByUserId(@PathVariable("userId") String userId);

    @RequestMapping(value="/user/baseInfo", method = RequestMethod.GET)
    UserDO getUserInfo(@RequestParam("user_id") String userId);

    @RequestMapping(value="/user/bywx", method = RequestMethod.GET)
    ResultVO getAppUserById(@RequestParam("userId") String userId);
}
